// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
const apiPrefix = '/web';

/** 告警信息分页查询 告警信息分页查询数据 GET /v1/monitor-server/alertInfo/page */
export async function monitorServerControllerAlertInfoPage(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.monitorServerControllerAlertInfoPageParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultPaginationMonitorAlertInfo>(
    `${apiPrefix}/v1/monitor-server/alertInfo/page`,
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    },
  );
}

/** 组件资源分页查询 组件资源分页查询数据 GET /v1/monitor-server/component/page */
export async function monitorServerControllerComponentPage(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.monitorServerControllerComponentPageParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultPaginationMonitorComponent>(
    `${apiPrefix}/v1/monitor-server/component/page`,
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    },
  );
}

/** 告警配置查询 告警配置查询数据 GET /v1/monitor-server/rule */
export async function monitorServerControllerMonitorRule(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.monitorServerControllerMonitorRuleParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultMonitorRuleDTO>(`${apiPrefix}/v1/monitor-server/rule`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 保存组件资源状态-告警阈值 保存组件资源状态-告警阈值 PUT /v1/monitor-server/rule/component/save */
export async function monitorServerControllerSaveComponent(
  body: API.Component,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultVoid>(`${apiPrefix}/v1/monitor-server/rule/component/save`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 保存数据库资源状态-告警阈值 保存数据库资源状态-告警阈值 PUT /v1/monitor-server/rule/database/save */
export async function monitorServerControllerSaveDatabase(
  body: API.Database,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultVoid>(`${apiPrefix}/v1/monitor-server/rule/database/save`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 保存硬件资源状态-告警阈值 保存硬件资源状态-告警阈值 PUT /v1/monitor-server/rule/hard/save */
export async function monitorServerControllerSaveHard(
  body: API.Server,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultVoid>(`${apiPrefix}/v1/monitor-server/rule/hard/save`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 保存告警配置 保存告警配置 PUT /v1/monitor-server/rule/save */
export async function monitorServerControllerSaveRule(
  body: API.Rule,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultVoid>(`${apiPrefix}/v1/monitor-server/rule/save`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 站点服务器资源状态 站点服务器资源状态数据 GET /v1/monitor-server/server */
export async function monitorServerControllerServerRealTime(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.monitorServerControllerServerRealTimeParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultMonitorServerDTO>(`${apiPrefix}/v1/monitor-server/server`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 站点服务器分页查询 站点服务器分页查询数据 GET /v1/monitor-server/server/page */
export async function monitorServerControllerServerPage(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.monitorServerControllerServerPageParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultPaginationMonitorServer>(
    `${apiPrefix}/v1/monitor-server/server/page`,
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    },
  );
}

/** 电站详情 电站详情数据 GET /v1/monitor-server/station */
export async function monitorServerControllerStationDetail(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.monitorServerControllerStationDetailParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultStationInfoDTO>(`${apiPrefix}/v1/monitor-server/station`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 电站分页查询 电站分页查询数据 GET /v1/monitor-server/station/page */
export async function monitorServerControllerStationPage(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.monitorServerControllerStationPageParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultPaginationStationInfoDTO>(
    `${apiPrefix}/v1/monitor-server/station/page`,
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    },
  );
}

/** 站点所有用户查询 站点所有用户查询数据 GET /v1/monitor-server/station/userList */
export async function monitorServerControllerFindAllStationUsers(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.monitorServerControllerFindAllStationUsersParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultListMonitorUserDTO>(
    `${apiPrefix}/v1/monitor-server/station/userList`,
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    },
  );
}
